;(function () {
  new Vue({
    el: '#cConfig',
    data: {
      modulesList: [],
      quanxian: JSON.parse(window.localStorage.getItem('permissions')),
    },
    methods: {
      getmodules () {
        hlhttp.get({
          url: 'portal/modules',
          success: (data) => {
            this.modulesList = data;
          }
        })
      },
      //类型切换
      tabType (item, id) {
        let status = item == 'ATCLS' ? 'ATCLM' : 'ATCLS';
        hlhttp.put({
          url: 'configure/type_switch',
          data: {publishing_type: status, module_id: id},
          success: (data) => {
            hl.toast('操作成功')
            this.getmodules()
          }
        })
      }
    },
    mounted () {
      this.getmodules()
    }
  })
} ())
